﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DishesList.aspx.cs" Inherits="SME.Food.Tricon.Web.AdminJS.DishesManage.DishesList" %>

<%@ Import Namespace="System.Data" %>
<div>
    <form id="pagerForm" method="post" action="DishesManage/DishesList.aspx">
    <input type="hidden" name="SearchDishesName" value="<%=SearchDishesName %>">
    <input type="hidden" name="SearchDishesNo" value="<%=SearchDishesNo %>" />
    <input type="hidden" name="pageNum" value="<%=PageNum %>" />
    <input type="hidden" name="numPerPage" value="<%=NumPerPage %>" />
    </form>
    <div class="pageHeader">
        <form id="MemberList" onsubmit="return navTabSearch(this);" action="DishesManage/DishesList.aspx"
        method="post">
        <%-- 此隐藏控件存放带回的数据的id--%>
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        菜品名称：<input type="text" size="17" name="SearchDishesName" value="<%=SearchDishesName %>" />
                    </td>
                    <td>
                        菜品编号：<input type="text" size="17" name="SearchDishesNo" value="<%=SearchDishesNo %>" />
                    </td>
                    <td>
                        <select name="DishesStuta">
                            <option value="">状态</option>
                            <option value="0" <%=DishesStuta=="0"?"selected":"" %>>有</option>
                            <option value="1" <%=DishesStuta=="1"?"selected":"" %>>无</option>
                        </select>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        </form>
    </div>
    <div class="pageContent">
        <div class="panelBar">
            <ul class="toolBar">
                <li><a class='add' title='菜品新增' href='DishesManage/DishesModify.aspx?type=modify'
                    target='dialog' rel='dialogs' width='416' height='283'><span>添加</span></a></li>
                <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" posttype="string" href="DishesManage/DishesH.aspx?type=deleteAll"
                    class="delete"><span>批量删除</span></a></li>
            </ul>
        </div>
        <table class="table" nowraptd="false" width="100%" layouth="141">
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" class="checkboxCtrl" group="ids" />
                    </th>
                    <th align="center">
                        菜品编号
                    </th>
                    <th align="center">
                        菜品名称
                    </th>
                    <th align="center">
                        单价
                    </th>
                    <th align="center">
                        状态
                    </th>
                    <th align="center">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                <% if (Table != null)
                   {
                       foreach (DataRow dr in Table.Rows)
                       { %>
                <tr>
                    <td>
                        <input name="ids" type="checkbox" value="<%=dr["Dishes_No"] %>" />
                    </td>
                    <td align='center'>
                        <%=dr["Dishes_No"]%>
                    </td>
                    <td align='center'>
                        <%=dr["Dishes_Name"] %>
                    </td>
                    <td align='center'>
                        <%=dr["Dishes_Price"]%>
                    </td>
                    <td align='center'>
                        <%=dr["Dishes_statue"].ToString() == "0" ? "有" : "无"%>
                    </td>
                    <td align='center'>
                        <a title="删除"  target="ajaxTodo" href="DishesManage/DishesH.aspx?type=delete&Dishes_No=<%=dr["Dishes_No"] %>" class="btnDel">删除</a> 
                        <a title="编辑" rel='dialogs' target="dialog" href="DishesManage/DishesModify.aspx?type=update&Dishes_No=<%=dr["Dishes_No"] %>" class="btnEdit">编辑</a>
                    </td>
                </tr>
                <% }
                   } %>
            </tbody>
        </table>
        <div class="panelBar">
            <div class="pages">
                <span>显示</span>
                <select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                    <option value="20">20</option>
                    <option value="50">50</option>
                    <option value="100">100</option>
                    <option value="200">200</option>
                </select>
                <span>条，共${totalCount}条</span>
            </div>
            <div class="pagination" targettype="navTab" totalcount="200" numperpage="20" pagenumshown="10"
                currentpage="1">
            </div>
        </div>
    </div>
</div>
